Retrieve Family Data - #6
Open
Alumniminium wants to merge 3 commits into
Open
Conversation
- Update atlas.csproj target framework from net8.0 to net10.0 - Update Dockerfile SDK and runtime images to 10.0-alpine 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
High Priority: - Remove 27 lines of dead proxy code from GenericServer.cs - Fix critical bug in ReceivePayload() - was creating zero-length Memory<byte> - Remove hardcoded user path /home/trbl/.dotnet in CGI.cs Medium Priority: - Add centralized error logging via Program.LogError() - Simplify MIME type matching with Location.IsAllowedMimeType() helper - Extract configuration defaults to static Defaults class Low Priority: - Simplify token replacement - remove Dictionary<Func>, use direct calls - Simplify animated response logic - reduce duplication (35→28 lines) - Consolidate request string normalization in Context.Request property - Simplify certificate date validation for better readability Summary: - ~80 lines removed - 1 critical bug fixed (file uploads would fail) - Better maintainability and code clarity - Zero features lost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Routing Logic (GenericServer.cs):
- Extract handler methods: ServeDirectoryListing, ServeCGI, ServeFile, ValidateUpload
- Flatten nested directory/index handling with early returns
- Simplify text MIME check: use mimeType.StartsWith("text/")
- Simplify CGI line ending logic: use isFirstLine flag
- Remove duplicate size validation in ProcessFileUpload
- Better separation of concerns
CGI (CGI.cs):
- Extract environment setup: AddBaseEnvironmentVariables, AddGeminiEnvironmentVariables
- Remove duplicate AUTH_TYPE logic (was in 2 places)
- Remove ExecuteScript overload - merged into single method RunScript
- Simplify process output handling: cleaner null checks
- Use using statement for Process disposal
- Improve error output handling
Upload Processing (TitanUploader.cs):
- Parse Titan parameters efficiently with LINQ
- Extract ParseTitanParameters helper method
- Use Defaults.DefaultMimeType constant
- More concise and readable
Results:
- ~50 lines net reduction
- Better method organization
- Single responsibility principle
- No features lost
- More maintainable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.